Objects Reference

flyEngine::collision_test

Prototype

int collision_test(bsp_node *n,vector& p1,vector& p2,int elemtype=0,float rad=0.0f)

Parameters

Parameter Type Description
n bsp_node * bsp root node
p1 vector& first point
p2 vector& secont point
elemtype int object type modifier
rad float collision radius

Return Value

Returns TRUE if a collision is found, FALSE if no collision is found.

Remarks

This function is used for collision detection between p1 and p2. It returns the first collision from p1 to p2 and is faster than the collision_bsp function.